package cn.roadtrip.utilmodule.util.enumpck;

/**
 *  游客旅游团类型
 */
public enum Enum_TourTravelGroupType {
    // Self-个人，Team-包车，Group-大团
    Self("Self", "个人"),
    Team("Team", "包车"),
    Group("Group", "大团");
    private String s;
    private String title;

    Enum_TourTravelGroupType(String s, String title) {
        this.s = s;
        this.title = title;
    }
    Enum_TourTravelGroupType(String s) {
        this.s = s;
        this.title = cn.roadtrip.utilmodule.util.enumpck.Enum_ShopType.parseCode(s).getTitle();
    }

    public String getTitle() {
        return this.title;
    }

    public String getCode() {
        return this.s;
    }


    public static final Enum_TourTravelGroupType parseCode(String code) {
        switch (code) {
            //-个人，-包车，-大团
            case "Self":
                return Self;
            case "Team":
                return Team;
            case "Group":
                return Group;
        }
        return null;
    }

    @Override
    public String toString() {
        return "(code:%s, title:%s)".formatted(this.s, this.title);
    }


}
